9bf92232e0768ded33800738be48eb47ed26f014,src/main/java/eu/phiwa/dragontravel/nms/v1_8_R3/RyeDragon.java,RyeDragon,travel,#,303

Before Change


                    return;
                }
            }
            this.yaw = getCorrectYaw(myX, myZ);
            this.pitch = getCorrectPitch(myX, myY, myZ);
            setPositionRotation(myX, myY, myZ, yaw, pitch);
            return;
        }

        // Getting the correct height
        if ((int) locY < travelY)
            myY += DragonTravelMain.getInstance().getConfigHandler().getSpeed();

        if (myX < toX)
            myX += XperTick;
        else
            myX -= XperTick;

        if (myZ < toZ)
            myZ += ZperTick;
        else
            myZ -= ZperTick;

        if ((int) myZ == (int) toZ && ((int) myX == (int) toX
                || (int) myX == (int) toX + 1 || (int) myX == (int) toX - 1)) {
            finalmove = true;
        }
        this.yaw = getCorrectYaw(myX, myZ);
        this.pitch = getCorrectPitch(myX, myY, myZ);
        setPositionRotation(myX, myY, myZ, yaw, pitch);
        coveredDist = Math.hypot(getEntity().getLocation().getBlockX() - start.getBlockX(), getEntity().getLocation().getBlockZ() - start.getBlockZ());
        if (coveredDist > totalDist) {
            coveredDist = totalDist;

After Change


            coveredDist = totalDist;
        }
        ((LivingEntity) getEntity()).setHealth(60 * (coveredDist / totalDist));
        setPosition(myX, myY, myZ);
    }

    /**